package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import lombok.Data;

import java.util.List;

/**
 * <p>
 *
 * </p>
 */
@Data
@EntityClassAnnotation(remark = "流程表")
@TableName("sys_flow")
@EntityIndexAnnotation(ux = {"code"})
public class Flow extends SimpleDataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "流程标识",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String code;

    @EntityFieldAnnotation(
            text = "名称",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String name;

    @EntityFieldAnnotation(
            text = "状态字段",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String fieldName;

    @EntityFieldAnnotation(
            text = "状态",
            length = "",
            not_null = true,
            default_value = "",
            comment = "0:启用，1:禁用"
    )
    private Boolean flagDisable;

    @EntityFieldAnnotation(
            text = "备注",
            length = "255",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "是否校验流程实例状态",
            length = "",
            not_null = false,
            default_value = "",
            comment = "1:将严格校验流程实例(此时流程实例需要跟数据流程状态保持一致，handleFlowChange、handleFlowChangeBatch)"
    )
    private Boolean flagCheckExecution;


    @TableField(exist = false)
    private List<FlowNode> flowNodeList;

    @TableField(exist = false)
    private List<FlowButton> flowButtonList;

}
